package io.gitee.wminyu.day02;

import java.util.Arrays;
import java.util.Scanner;

public class reverseArrays {
    public static void main(String[] args){
        Scanner input =  new  Scanner(System.in);
        int m = input.nextInt();
        int arrays[] = new int [m];
        for (int i=0;i<m;i++){
            arrays[i]=input.nextInt();
        }
        reverse(arrays);
    }
    public static void reverse(int[] numbers){
        int temp;
            for (int i= 0;i < numbers.length; i++){
                temp = numbers[i];
                numbers[i] = numbers[numbers.length-1];
                numbers[numbers.length-1] = temp;
                break;
        }System.out.println(Arrays.toString(numbers));
    }
}
